package com.bng8.superstar_cms.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 任务明细表
 *
 * @TableName sup_mission
 */
@TableName(value = "sup_mission")
@Data
public class SupMissionDO implements Serializable {
    /**
     * serialVersionUID
     */
    @TableField(exist = false)
    private static final long serialVersionUID = 6800753471290638953L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    /**
     * 用户名
     */
    @TableField(value = "user_name")
    private String userName;

    /**
     * 挑战者
     */
    @TableField(value = "challenger")
    private String challenger;

    /**
     * 任务名
     */
    @TableField(value = "mission_name")
    private String missionName;

    /**
     * 目标数
     */
    @TableField(value = "mission_num")
    private Integer missionNum;

    /**
     * 完成数
     */
    @TableField(value = "quantity")
    private Integer quantity;

    /**
     * 奖品
     */
    @TableField(value = "prize")
    private String prize;

    /**
     * 创建时间
     */
    @TableField(value = "gmt_create", fill = FieldFill.INSERT)
    private LocalDateTime gmtCreate;

    /**
     * 修改时间
     */
    @TableField(value = "gmt_update", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime gmtUpdate;

    /**
     * 创建者
     */
    @TableField(value = "creator", fill = FieldFill.INSERT)
    private String creator;

    /**
     * 修改者
     */
    @TableField(value = "operator", fill = FieldFill.INSERT_UPDATE)
    private String operator;

    /**
     * 1：有效 — 1：无效（删除时置为-1）
     */
    @TableField(value = "deleted", fill = FieldFill.INSERT)
    @TableLogic
    private Integer deleted;

    /**
     * 乐观锁
     */
    @TableField(value = "version", fill = FieldFill.INSERT)
    @Version
    private Long version;
}